using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

namespace PickMeUp
{
    public class GameLauncher : MonoBehaviour
    {
        private void Awake()
        {
            _ = GameApp.Instance;
        }

        private void Start()
        {
            StartCoroutine(nameof(StartGame));
        }

        private IEnumerator StartGame()
        {
            yield return new WaitWhile(() => GameApp.Instance.Id == GameDefines.E_GameFSMState.InitializeState);
            yield return new WaitForSeconds(1);
            SceneManager.LoadScene("GameScene");
        }
    }
}
